Skip to main content

Receive Mock Funds

This operation simulates receiving funds through PIX payment to fill your Avenia balance with any currency.

Quote

Endpoint

GET /v2/account/quote/fixed-rate

Parameters

FieldValueTypeDescription
inputCurrencyBRLstringThe currency you are paying with
inputPaymentMethodPIXstringThe payment method you are using
outputCurrencyBRLAstringThe currency you want to receive
outputPaymentMethodINTERNALstringThe method you want to receive funds
inputAmount1000decimal.DecimalThe amount you want to pay/deposit. Required if outputAmount is not provided.
outputAmount-decimal.DecimalThe amount you want to receive. Required if inputAmount is not provided.
inputThirdPartyfalseboolSpecifies whether the input is coming from a third party. true or false.
outputThirdPartyfalseboolSpecifies whether the output is going to a third party. true or false.
blockchainSendMethodPERMITstringDefines the blockchain transaction type. Can be TRANSFER or PERMIT. Required for blockchain inputs.

Example

curl -X GET "https://api.sandbox.avenia.io:10952/v2/account/quote/fixed-rate?inputCurrency=BRL&inputPaymentMethod=PIX&inputAmount=1000&outputCurrency=BRLA&outputPaymentMethod=INTERNAL&inputThirdParty=false&outputThirdParty=false&blockchainSendMethod=PERMIT"
info

The outputCurrency and outputPaymentMethod can be any valid combination. See Supported Assets Table for valid options.

Sandbox auto-payment limit

In sandbox, the PIX deposit is auto-paid by a simulated payer (no real transfer required), so the ticket completes on its own within a few seconds. This auto-payment only triggers for amounts up to R$1,000. If you create a ticket above this limit, it will stay in the created state and you will only receive the TICKET-CREATED webhook — no deposit and no TICKET-COMPLETE. Keep inputAmount at 1000 or below when testing. This cap applies to sandbox only; there is no such limit in production.

Ticket

To complete the operation, create a ticket with the quoteToken from the quote response:

{
"quoteToken": "eyJhdXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"ticketBlockchainOutput": {
"beneficiaryWalletId": "00000000-0000-0000-0000-000000000000"
}
}
info

The nil UUID (00000000-0000-0000-0000-000000000000) represents the current operating account. The operating account is resolved at quote time based on the subAccountId parameter.

Sub-Account Operations

To execute this operation on behalf of a sub-account, you must pass ?subAccountId={uuid} (using the same UUID) in every request for that ticket — the quote, the ticket creation, and any later GET:

GET  /v2/account/quote/fixed-rate?subAccountId={uuid}   ← required here
POST /v2/account/tickets/?subAccountId={uuid} ← and here (same UUID)
GET /v2/account/tickets/{ticketId}?subAccountId={uuid} ← and here too

Omitting subAccountId from the quote causes the operation to resolve to the main account — passing it only in the ticket has no effect. Likewise, a GET on a sub-account's ticket without subAccountId resolves to the main account and returns 404 Not Found, because the ticket belongs to the sub-account.

info

For different outputCurrency and outputPaymentMethod combinations, additional ticket parameters may be required. See Operations Combinations for details.